<template>
  <div class="test-container">
    <ImageLoader
      src="https://images.pexels.com/photos/33109/fall-autumn-red-season.jpg?fit=crop&crop=entropy&w=3456&h=2304"
      placeholder="https://images.pexels.com/photos/33109/fall-autumn-red-season.jpg?w=100"
      @load="handleLoaded"
      :duration="3000"
    />
  </div>
</template>

<script>
import ImageLoader from "./";
export default {
  name: "App",
  components: {
    ImageLoader,
  },
  methods: {
    handleLoaded() {
      // console.log('图片全部加载完成')
    },
  },
};
</script>

<style lang="less" scoped>
.test-container {
  width: 500px;
  height: 400px;
  margin: 0 auto;
  position: relative;
}
</style>